package total;

import java.util.Scanner;

public class Ques1618 {
	
	int n;
	int sum = 0;
	
	public int fi(int num1,int num2){
		sum = num1 + num2;
		if(--n > 0){
			sum = fi(num2,num1 + num2);
			return sum;
		}
		return sum;
	}
	
	public void go(){
		Scanner scan = new Scanner(System.in);
		int m;
		while(scan.hasNext()){
			this.n = scan.nextInt();
			if(n == 1){
				System.out.println(1);
				continue;
			}else if(n == 2){
				System.out.println(2);
				continue;
			}
			n = n - 2;
			System.out.println(fi(1,2));
		}
	}
	
	public static void main(String[] args) {
		new Ques1618().go();
	}
}
